package com.dfbz.demo;

import java.io.Serializable;

/**
 * @author lscl
 * @version 1.0
 * @intro:
 */
public class Goods implements Serializable {

    // 锁定版本号(让版本号不要随着类的变化而变化)
    private static final long serialVersionUID = 1L;

    // 标题
    private String title;

    // 价格
    private Double price;

    // 品牌
    private String brand;

    // 库存
    private transient Integer store;                // 瞬态变量(不会被序列化的变量)

    public Goods(String title, Double price, Integer store) {
        this.title = title;
        this.price = price;
        this.store = store;
    }

    public Goods() {
    }

    public Goods(String title, Double price, String brand, Integer store) {
        this.title = title;
        this.price = price;
        this.brand = brand;
        this.store = store;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public Integer getStore() {
        return store;
    }

    public void setStore(Integer store) {
        this.store = store;
    }

    @Override
    public String toString() {
        return "Goods{" +
                "title='" + title + '\'' +
                ", price=" + price +
                ", brand='" + brand + '\'' +
                ", store=" + store +
                '}';
    }
}
